<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>EditorSetParameter</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>

<body>

<h1>EditorSetParameter</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a  href="../index.html">structures</a><br>
</div>

<div class=shortdescr>
The <dfn>EditorSetParameter</dfn> structure is used in the
<a href="../service_functions/editorcontrol.html#ECTL_SETPARAM">EditorControl</a>
function to change the settings of the current FAR editor.
</div>

<pre class=syntax>
struct EditorSetParameter
{
  int Type;
  union {
    int iParam;
    char *cParam;
    DWORD Reserved1;
  } Param;
  DWORD Flags;
  DWORD Reserved2;
};
</pre>

<h3>Elements</h3>
<div class=descr>
  <div class=dfn>Type</div>
  <div class=dfndescr>Which setting to change. Can have one of the following values
 (the <a name="EDITOR_SETPARAMETER_TYPES">EDITOR_SETPARAMETER_TYPES</a> enum):
    <table class="cont">
      <tr class="cont"><th class="cont" width="40%">Option</th><th class="cont" width="60%">Description</th></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_AUTOINDENT">ESPT_AUTOINDENT</a></td>
    <td class="cont" width="60%">Sets the "<em>Auto indent</em>" mode according to
      <dfn>iParam</dfn>=TRUE or FALSE.</td></tr>


    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_CHARCODEBASE">ESPT_CHARCODEBASE</a></td>
    <td class="cont" width="60%">Display format of the current character code in the editor status line.

    <dfn>iParam</dfn> can have one of the following values:
      <ul>
    <li>0 - octal (3 characters with leading zeros)</li>
    <li>1 - decimal (3 characters with leading spaces)</li>
    <li>2 - hexadecimal (2 digits + the character '<code>h</code>')</li>
      </ul>
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_CHARTABLE">ESPT_CHARTABLE</a></td>
    <td class="cont" width="60%">
    Sets the current character table in the editor.
    The value of <dfn>iParam</dfn> can be:
      <ul>
      <li>1 - OEM</li>
      <li>2 - ANSI</li>
      <li>3 - character table with the index 0</li>
      <li>...</li>
      <li>N - character table with the index (N-3)</li>
      </ul>
      In case of an error, FALSE is returned by <a href="../service_functions/editorcontrol.html#ECTL_SETPARAM">EditorControl</a>
      and the character table is not changed.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_CURSORBEYONDEOL">ESPT_CURSORBEYONDEOL</a></td>
    <td class="cont" width="60%">
    Sets the "<em>Cursor beyond end of line</em>" mode according to <dfn>iParam</dfn>=TRUE or FALSE.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_EXPANDTABS">ESPT_EXPANDTABS</a></td>
    <td class="cont" width="60%">Controls the behaviour of tabs to spaces convertion.<br>
      <dfn>iParam</dfn> can be one of the following flags (<a name="EXPAND_TABS">EXPAND_TABS</a> enum):
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
       <tr class="cont"><td class="cont" width="40%"><a name="EXPAND_NOTABS">EXPAND_NOTABS</a></td>
       <td class="cont" width="60%"></td></tr>
       <tr class="cont"><td class="cont" width="40%"><a name="EXPAND_ALLTABS">EXPAND_ALLTABS</a></td>
       <td class="cont" width="60%"></td></tr>
       <tr class="cont"><td class="cont" width="40%"><a name="EXPAND_NEWTABS">EXPAND_NEWTABS</a></td>
       <td class="cont" width="60%"></td></tr>
</table>

<p class=note><img src="../../images/warning.gif" alt="Attention!" width="10" height="10"> Attention!</p>
<UL class=note><LI>
      This operation is not reversible; that is, if a file contained tabs instead of spaces,
      the sequences of spaces in the file will not be converted to tabs when the "Expand tabs to spaces" mode is disabled.
</LI></UL>

    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_LOCKMODE">ESPT_LOCKMODE</a></td>
    <td class="cont" width="60%">
    Prohibit or allow user to modify the text in the editor (similar to <kbd>Ctrl-L</kbd>) according to
    <dfn>iParam</dfn>=TRUE or FALSE.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_SAVEFILEPOSITION">ESPT_SAVEFILEPOSITION</a></td>
    <td class="cont" width="60%">
    Sets the "<em>Save file position</em>" option according to <dfn>iParam</dfn>=TRUE or FALSE.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_SETWORDDIV">ESPT_SETWORDDIV</a></td>
    <td class="cont" width="60%">Changes the word delimiter set (using the <dfn>cParam</dfn> field)
       for the current editor instance.<br>

       If <dfn>cParam</dfn> is <code>NULL</code> or the empty string,
       the default delimiter set -
       "<code>~!%^&amp;*()+&#124;{}:"&lt;&gt;?`-=\[];',./</code>" - is used.
       The word delimiter set cannot contain more than 255 characters.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_GETWORDDIV">ESPT_GETWORDDIV</a></td>
    <td class="cont" width="60%">Retrieves the word delimiter set (using the <dfn>cParam</dfn> field)
       for the current editor instance.<br>
       <dfn>cParam</dfn> should point to a buffer of at least 256 characters.
    </td></tr>

    <tr class="cont"><td class="cont" width="40%"><a name="ESPT_TABSIZE">ESPT_TABSIZE</a></td>
    <td class="cont" width="60%">Changes the tabsize. <dfn>iParam</dfn>
      is the new value - between 1 and 512. If <dfn>iParam</dfn> is out of range, tabsize is set to 8.</td></tr>

   </table>


  </div>

  <div class=dfn>iParam</div>
  <div class=dfndescr>Contains a numeric setting; see the description of the individual settings.</div>

  <div class=dfn>cParam</div>
  <div class=dfndescr>Contains a pointer to a null-terminated text string; see the description of individual settings.</div>

  <div class=dfn>Reserved1</div>
  <div class=dfndescr>Not used; reserved for future use.</div>

  <div class=dfn>Flags</div>
  <div class=dfndescr>Contains additional flags or data; see the description of individual settings.</div>

  <div class=dfn>Reserved2</div>
  <div class=dfndescr>Not used; reserved for future use. Must be set to 0.</div>
</div>

<h3>Remarks</h3>
<div class=descr>
If a plugin changes the values of the "<em>Tabsize</em>" and "<em>Expand tabs to spaces</em>" parameters at the same time,
it is recommended to set the tabsize first and then set the "Expand tabs to spaces" mode. </div>

<div class=see>See also:</div><div class=seecont>
<a href="index.html">structures</a> |
<a href="../delphi/teditorsetparameter.html">TEditorSetParameter</a>
</div>

</body>
</html>
